Three steps to attach, and debug in Xcode, a /usr/sbin/mDNSResponder that is already running.  One caveat, mDNSResponder has to be built and deployed (using step 1 and 2 below) before it can be attached to Xcode.

1.) First you have to build the Xcode project with symbols included and optimizations off.

	a.) From Terminal shell, open mDNSResponder Xcode project from top of tree:  

		$ open mDNSMacOSX/mDNSResponder.xcodeproj/

	You can also just double click on the project from Finder.

	b.) Add your diffs to mDNSResponder project.

	c.) Set Strip Linked Product to No and compiler Optimization Level to None.  Below shows changed settings.

¬

      ¬

	d. ) Build mDNSResponder by setting the target to mDNSResponder.

		¬

	Then execute Command-B to build.

2.) Next, deploy newly-created Xcode version.

	a.)  Go to Terminal shell and type the following:  sudo mv 

	b.) Then drag mDNSResponder from Products list on left side panel (shown below using red arrow) to Terminal shell.

¬

	c.) Execute command.

	For example:
		
		$ sudo mv /Volumes/iMac\ HD/Users/llaier/Library/Developer/Xcode/DerivedData/mDNSResponder-fktewmdupxbxrrdlsdljyhmihboz/Build/Products/mDNSResponder /usr/sbin/mDNSResponder

	d.) Restart mDNSResponder by executing the following:

	$ sudo killall mDNSResponder

3.) In Xcode, select Debug > Attach to Process > mDNSResponder. 

	Now set a breakpoint and try to trigger it.